Skip to content

Summary: group identical pixel findings across routes and widths - #79

Merged
tmashara merged 2 commits into
mainfrom
claude/issue-48-group-findings
Oct 29, 2026
Merged

tmashara merged 2 commits into
mainfrom
claude/issue-48-group-findings

Conversation

@tmashara

@tmashara tmashara commented Oct 29, 2026 •

Copy link
Copy Markdown
Owner

What / why

A change shared by many routes (a restyled header, a removed nav link) printed once per route row, so 37 routes read as 37 problems. A new findings: block lists each repeated finding once, with every route and width it was seen at:

findings: 2 repeated on 2+ routes
  -"Pricing"  ×2 routes  /nav@1440,375 /nav?again@1440,375
  -a[href="#pricing"] "Pricing"  ×2 routes  /nav@1440,375 /nav?again@1440,375

It's in the piped summary and the TTY summary (before computed:), in results.json as summary.findings (always present, [] when none: { finding, selector?, at: [{ url, widths }] }), and collapsed at the top of report.html next to the computed-styles one.

Grouping key

The printed token, so identical tokens group and the example shown is exact:

  • element: fmtElements([e]) (selector, side, first two changed props with values / text / box deltas / re-parented)
  • text line: +"…" / -"…"
  • band delta band ±Npx, only for a band with no located element (otherwise its element already groups it)

Kept only when it spans 2+ routes; widths of one route already collapse in the per-route rows. Sorted by routes, then shots, then token. Caps reuse SHOWN and fmtAt from computed.ts (20 findings, 3 routes each, then +N routes / (+N more in results.json)).

Excluded: accepted shots and accepted bands/regions. varies, masked and unstable pixels are already out of regions, so they need no filtering. No pixel-hash key, no --mask suggestion per group (a repeated element is as often the intended change).

pixelFindings and groupFindings share addAt (the at: [{ url, widths }] list) and fmtAt (/a@1440,375 … +N routes) from computed.ts. Both new functions live in report.ts so run.ts can import them without a cycle.

How tested

  • New visual test (controls.test.ts): /nav + /nav?again at 1440 and 375 (the fixture server routes on the path, so it's the same diff twice). It pins summary.findings, the stdout header and line, and the report section. It fails without the src change and passes with it.
  • The shared CONTROLS run now asserts summary.findings is [] and stdout has no findings: line, so different changes don't group.
  • npm run typecheck, lint, format:check, npm test (302 pass), npm run test:visual (333 pass).

Docs: docs/output.md (token row, report line, results.json example), skills/renderdiff reference.md and SKILL.md read order.

Fixes #48

🤖 Generated with Claude Code

tmashara and others added 2 commits October 29, 2026 18:28
A shared change (a restyled header, a removed nav link) showed once per route row.
`findings:` lists each element change, text line or element-less band delta seen on
two or more routes once, with every route and width, in stdout, results.json
(`summary.findings`) and the report summary.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… copying them, wrap the docs lines

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@tmashara
tmashara merged commit 506b8cf into main Oct 29, 2026
3 checks passed
@tmashara
tmashara deleted the claude/issue-48-group-findings branch October 29, 2026 17:39
@tmashara tmashara mentioned this pull request Oct 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Group identical pixel findings across routes and widths

1 participant